import { createRouter, createWebHashHistory, type Router } from 'vue-router'
import routes from './routes'

const router: Router = createRouter({
  history: createWebHashHistory(),
  routes,
  // 如下，添加滚动行为
  scrollBehavior() {
    return {
      left: 0,
      top: 0
    }
  }
})

router.afterEach(() => {})

export default router
